import {createRouter, createWebHistory} from 'vue-router'

const routes: any = [
    {
        path: "/",
        name: "layout",
        component: () => import("@/views/LayoutView/LayoutView.vue"),
        children: [
            {
                path: '/',
                name: 'home',
                component: () => import('@/views/HomeView/HomeView.vue')
            },
            {
                path: "/place",
                name: "place",
                component: () => import('@/views/PlaceView/PlaceView.vue')
            },
            {
                path: "/shop",
                name: "shop",
                component: () => import('@/views/ShopView/ShopView.vue')
            },
            {
                path: "/person",
                name: "person",
                component: () => import('@/views/PersonView/PersonView.vue')
            },
            {
                path: "/mine",
                name: "mine",
                component: () => import('@/views/MineView/MineView.vue')
            }
        ]
    },
    {
        path: '/city',
        name: 'city',
        component: () => import('@/views/HomeView/City.vue')
    },
    {
        path: '/beauty',
        name: 'beauty',
        component: () => import('@/views/HomeView/BeautyView.vue')
    },
    {
        path: "/goodsDetails/:id",
        name: "goodsDetails",
        component: () => import('@/views/GoodsView/GoodsDetails.vue')
    },
    {
        path:"/commentList",
        name:"commentList",
        component:()=>import('@/views/GoodsView/components/CommentListView.vue')
    },
    {
        path:"/placeDetails/:id",
        name:"placeDetails",
        component:()=>import('@/views/PlaceView/PlaceViewDetails.vue')
    },
    {
        path:"/placeMap",
        name:"placeMap",
        component:()=>import('@/views/PlaceView/PlaceMapView.vue')
    },
    {
        path:"/personDetails/:id",
        name:"personDetails",
        component:()=>import('@/views/PersonView/PersonDetailsView.vue')
    },
    {
        path:"/login",
        name:"login",
        component:()=>import('@/views/LoginView/LoginView.vue')
    },
    {
        path:"/register",
        name:"register",
        component:()=>import('@/views/LoginView/RegisterView.vue')
    },
    {
        path:"/setting",
        name:"setting",
        component:()=>import('@/views/MineView/MinSetView.vue')
    },
    {
        path:"/accountInformation",
        name:"accountInformation",
        component:()=>import('@/views/MineView/MineAccountView.vue')
    },
    {
        path: "/minedata",
        name: "minedata",
        component: () => import('@/views/MineView/MinDataView.vue')
    },
    {
        path: "/order/:index",
        name: "order",
        component: () => import('@/views/OrderView/OrderView.vue')
    },
    {
        path:'/pay/:id/:orderNo',
        name:'pay',
        component:()=>import('@/views/PayView/PayView.vue')
    }
]
const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router